//我的订单—全部
exports.order_all = function (req, res) {

    var restfulParams = req.routeInfo.restfulParams;
    //最终结果
    var resultData = {};
    var skip  =  restfulParams.skip == undefined  ? 0 : restfulParams.skip;

    var limit =  restfulParams.limit == undefined ? config.publicConfig.LIMIT : restfulParams.limit;
    //任务流创建
    async.waterfall([
            function (cb) {
                R.SEND_HTTP(
                    req,
                    {
                        url: CORE_APIConfig.coreAPI.search_user_order + "/sort_order/o_create_time-desc/o_oid/" + restfulParams.organization_id + "/skip/"+skip+"/limit/" + limit,
                        method: 'POST',
                        data: {
                            fields: ["o_id","o_no", "o_create_time", "o_old_price", "o_course_name", "o_course_pic", "o_phone","o_type", "o_new_price","o_name","o_pay_money","o_pay_status","o_activity_type","u_header_url"].join(",")
                        }
                    },
                    function (err, data) {
                        //判断是否有错误信息
                        if (err) {
                            return cb(err, data);
                        }
                        resultData.orderData = data.data;
                        cb();
                    }
                );

            }
        ], function (err, result) {

            //返回最终拼接结果
            RES.response(res, true, resultData);

        }
    );

}